<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- {{name}} -->

        <!-- <div>
            <samp v-if="name == '张三'">
                <p>张三</p>
            </samp>
            <samp v-else>
                <p> 李为</p>
            </samp>
            <hr>
            <samp v-if="name == '李为'">                                
                <p> 李为</p>
            </samp>
            <samp v-else>
                <p> 张三</p>
            </samp>
        </div> -->
        <table border="1">
            <thead>
                <th>名称</th>
                <th>性别</th>
            </thead>
            <tbody>
                <tr v-for="item in getlist">
                    <td>{{item.name}}</td>
                    <td>{{item.sex}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
<script>
    var vu = new Vue({
        el: "#app",
        data: {
            name: "李为",
            sex: "男",
            getlist: [{ name: "c乐", sex: "男"},{ name: "李文俊", sex: "女"}]
        }
    })
</script>

</html>